package ua.kpi_java_training.zabrodskyi.module3;

/**
 * Program simulation of the behavior of live organisms in some environment.
 * 
 * @author Maksym Zabrodskyi
 * @version 1.15 24-Jun-2013
 */
public class Controller {

	/**
	 * This method call methods of control of program, such as set up settings,
	 * initialization all elements in environment, run life in environment and
	 * print statistics.
	 * 
	 * @param args
	 *            - not used.
	 */
	public static void main(String[] args) {
		Settings settings = new Settings();
		settings.setUp();
		Environment environment = new Environment(Settings.getWidth(),
				Settings.getHeight());
		Initialization initialization = new Initialization(environment);
		initialization.doInitializeAllElements(settings);
		Life life = new Life(settings.getLengthLife());
		life.run(environment);
		Statistics statistics = new Statistics(environment, settings);
		statistics.printAllStatistics();
	}

}
